package com.xiaoxiaoxt.xiaoxiaoxapi.restController;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xiaoxiaoxt.xiaoxiaoxtdao.entity.Member;
import com.xiaoxiaoxt.xiaoxiaoxtdao.mapper.MemberMapper;
import com.xiaoxiaoxt.xiaoxiaoxtservice.impl.MemberServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/")
public class TestController{

    @Autowired
    MemberServiceImpl memberService;


    @Autowired
    MemberMapper memberMapper;

    @RequestMapping("test")
    public Object es2(){
        PageHelper.startPage(1, 10);
        List<Member> list = memberMapper.selectAll();
        PageInfo<Member> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
